import request from '@/utils/axios'
import {
  URL_API
} from '@/utils/mUtils'
const base = URL_API()

//数据字典列表接口
export function DictionaryList(params) {
    return request({
      url: `${base}/api/dictionary/list`,
      method: 'post',
      data: params
    })
  }

//创建数据字典接口
export function CreateDictionary(params) {
  return request({
    url: `${base}/api/dictionary/create`,
    method: 'post',
    data: params,
  
  })
}

//删除数据字典
export function DeleteDictionary(params) {
  return request({
    url: `${base}/api/dictionary/delete`,
    method: 'delete',
    data: params,
  
  })
}

//编辑数据字典
export function UpdateDictionary(params) {
  return request({
    url: `${base}/api/dictionary/update`,
    method: 'put',
    data: params,
  
  })
}

//配置子数据字典列表
export function DictionaryItemList(params) {
  return request({
    url: `${base}/api/dictionary/item/list`,
    method: 'post',
    data: params
  })
}

//动态改变启用状态值
export function DictionaryOptions(params) {
  return request({
    url: `${base}/api/dictionary/options`,
    method: 'post',
    data: params
  })
}

//数据字典子菜单列表删除
export function DeleteItemDictionary(params) {
  return request({
    url: `${base}/api/dictionary/item/delete`,
    method: 'delete',
    data: params,
  
  })
}

//编辑子菜单数据
export function UpdateItemDictionary(params) {
  return request({
    url: `${base}/api/dictionary/item/update`,
    method: 'put',
    data: params,
  
  })
}

//数据字典子菜单创建
export function CreateItemDictionary(params) {
  return request({
    url: `${base}/api/dictionary/item/create`,
    method: 'post',
    data: params,
  
  })
}